<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IN ADMIN PANEL | Powered by INDEZINER</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/admin/css/style.css" />

<link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url()?>public/admin/css/niceforms-default.css" />
<script type="text/javascript" src="<?php echo base_url()?>public/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>public/admin/js/jquery.validate.js"></script>
<script>
	$().ready(function(){
		$('#form_submit').validate({
			errorLabelContainer: $("#form_submit div.error"),
			rules: {
				txt_user: {required:true},
				txt_pass : {required:true}
			},
			messages : {
				txt_user : {
					required : "Yêu cầu nhập UserName"
					},
				txt_pass : {
					required : "Yêu cầu nhập Pasword"
					}	
			},
		/*	submitHandler : function(form){
				$.ajax({
					url : "<?php echo base_url().'vesion2/home/form_login'?>",
					type : "POST",
					dataType : "html",
					data : "&username=" + $("#txt_user").val() + "&password=" + $("#txt_pass").val(),
					success : function(result)
					{
									
						$('#txt_user').val('');
						$('#txt_pass').val('');
					    if(result == '1')
						{
							setTimeout(function(){
								window.location.href = '<?php echo site_url('vesion2/home')?>'	
							},2000);
						} else {
							alert('Đăng nhập sai');	
						}
						
					}
				});
				return false;
				
			}*/		
		});
	});
	
</script>

</head>
<style>
	.error{
		color:red;
		font-weight:bold;	
	}
</style>
<body>
<div id="main_container">

	<div class="header_login">
   
    </div>

     
         <div class="login_form">
         
         <h3>Admin Panel Login</h3><br />
         <h4 style="padding:5px 10px; margin-top:5px; float:left; width:auto"><?php echo isset($error) ? $error : ""?></h4>
         <form action="<?php echo site_url('admin/login/process')?>" method="post" class="niceform" id="form_submit">
         
                <fieldset>
                    <dl>
                        <dt><label for="email">Username:</label></dt>
                        <dd><input type="text" name="txt_user" id="txt_user" style="width: 200px;" /></dd>
                    </dl>
                    <dl>
                        <dt><label for="password">Password:</label></dt>
                        <dd><input type="password" name="txt_pass" id="txt_pass" style="width: 200px;" /></dd>
                    </dl>
                    
                    <dl>
                        <dt><label></label></dt>
                       
                    </dl>
                    
                     <dl class="submit">
                    <input type="submit" name="submit" id="submit" value="Enter" />
                     </dl>
                    
                </fieldset>
                
         </form>
         </div>  
          
	
    
    <div class="footer_login">
    
    </div>

</div>		
</body>
</html>